package com.woniuxy.entity;

import lombok.Getter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * @author HP
 * @version 1.0
 * @project
 * @description
 * @date 2024/4/7 16:43:48
 */
@Getter
public class UserInfo extends User {

    private Integer userId;
    //在子类的构造器中一定要调用父类的构造器



    public UserInfo(String username, String password,
                    Collection<? extends GrantedAuthority> authorities, Integer userId) {
        super(username, password, authorities);
        this.userId = userId;
    }
}
